From: Joey Hess Date: Mon, 22 Sep 2025 14:20:36 +0000 (-0400) Subject: Add git-remote-p2p-annex and git-remote-tor-annex to standalone builds X-Git-Tag: archive/raspbian/10.20251029-1+rpi1~1^2~3^2~86 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b397e713413d87b94db3fd118b1702cc8a6db887;p=git-annex.git Add git-remote-p2p-annex and git-remote-tor-annex to standalone builds --- diff --git a/Build/Standalone.hs b/Build/Standalone.hs index 44e8171707..b98fcaaf66 100644 --- a/Build/Standalone.hs +++ b/Build/Standalone.hs @@ -221,6 +221,8 @@ installGitAnnex topdir = go (topdir literalOsPath "bin") error "cp failed" unlessM (boolSystem "strip" [File (fromOsPath (bindir literalOsPath "git-annex"))]) $ error "strip failed" + -- Note that when adding more commands here, wrapper + -- scripts also need to be added in standalone/ createSymbolicLink "git-annex" (fromOsPath (bindir literalOsPath "git-annex-shell")) createSymbolicLink "git-annex" (fromOsPath (bindir literalOsPath "git-remote-p2p-annex")) createSymbolicLink "git-annex" (fromOsPath (bindir literalOsPath "git-remote-tor-annex")) diff --git a/CHANGELOG b/CHANGELOG index fe989c47c5..acb06c4485 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -18,6 +18,7 @@ git-annex (10.20250829) UNRELEASED; urgency=medium * p2phttp: Fix a hang that could occur when used with --directory, and a repository in the directory got removed. * Added annex.assistant.allowunlocked config. + * Add git-remote-p2p-annex and git-remote-tor-annex to standalone builds. -- Joey Hess Fri, 29 Aug 2025 12:34:06 -0400 diff --git a/doc/bugs/git-remote-p2p-annex_missing_in_standalone_build.mdwn b/doc/bugs/git-remote-p2p-annex_missing_in_standalone_build.mdwn index 8733ffee3c..7a500ce63f 100644 --- a/doc/bugs/git-remote-p2p-annex_missing_in_standalone_build.mdwn +++ b/doc/bugs/git-remote-p2p-annex_missing_in_standalone_build.mdwn @@ -25,4 +25,4 @@ Try to use git-remote-p2p-annex from the latest standalone build. ### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders) - +> [[fixed|done]] --[[Joey]] diff --git a/standalone/linux/skel/git-remote-p2p-annex b/standalone/linux/skel/git-remote-p2p-annex new file mode 100755 index 0000000000..8414df0d84 --- /dev/null +++ b/standalone/linux/skel/git-remote-p2p-annex @@ -0,0 +1,24 @@ +#!/bin/sh +link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true +if [ -n "$link" ]; then + base="$(dirname "$link")" +else + base="$(dirname "$0")" +fi + +if [ ! -d "$base" ]; then + echo "** cannot find base directory (I seem to be $0)" >&2 + exit 1 +fi +if [ ! -e "$base/runshell" ]; then + echo "** cannot find $base/runshell" >&2 + exit 1 +fi + +# Get absolute path to base, to avoid breakage when things change directories. +orig="$(pwd)" +cd "$base" +base="$(pwd)" +cd "$orig" + +exec "$base/runshell" git-remote-p2p-annex "$@" diff --git a/standalone/linux/skel/git-remote-tor-annex b/standalone/linux/skel/git-remote-tor-annex new file mode 100755 index 0000000000..a9e722ea52 --- /dev/null +++ b/standalone/linux/skel/git-remote-tor-annex @@ -0,0 +1,24 @@ +#!/bin/sh +link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true +if [ -n "$link" ]; then + base="$(dirname "$link")" +else + base="$(dirname "$0")" +fi + +if [ ! -d "$base" ]; then + echo "** cannot find base directory (I seem to be $0)" >&2 + exit 1 +fi +if [ ! -e "$base/runshell" ]; then + echo "** cannot find $base/runshell" >&2 + exit 1 +fi + +# Get absolute path to base, to avoid breakage when things change directories. +orig="$(pwd)" +cd "$base" +base="$(pwd)" +cd "$orig" + +exec "$base/runshell" git-remote-tor-annex "$@" diff --git a/standalone/osx/git-annex.app/Contents/MacOS/git-remote-p2p-annex b/standalone/osx/git-annex.app/Contents/MacOS/git-remote-p2p-annex new file mode 100755 index 0000000000..d498b4ba23 --- /dev/null +++ b/standalone/osx/git-annex.app/Contents/MacOS/git-remote-p2p-annex @@ -0,0 +1,31 @@ +#!/bin/sh +link="$(readlink "$0")" || true +if [ -n "$link" ]; then + base="$(dirname "$link")" +else + base="$(dirname "$0")" +fi + +if [ ! -d "$base" ]; then + echo "** cannot find base directory (I seem to be $0)" >&2 + exit 1 +fi +if [ ! -e "$base/runshell" ]; then + echo "** cannot find $base/runshell" >&2 + exit 1 +fi + +# Get absolute path to base, to avoid breakage when things change directories. +orig="$(pwd)" +cd "$base" +base="$(pwd)" +cd "$orig" + +# If this is a standalone app, set a variable that git-annex can use to +# install itself. +if [ -e "$base/git-annex" ]; then + GIT_ANNEX_APP_BASE="$base" + export GIT_ANNEX_APP_BASE +fi + +exec "$base/runshell" git-remote-p2p-annex "$@" diff --git a/standalone/osx/git-annex.app/Contents/MacOS/git-remote-tor-annex b/standalone/osx/git-annex.app/Contents/MacOS/git-remote-tor-annex new file mode 100755 index 0000000000..2a8061d7e5 --- /dev/null +++ b/standalone/osx/git-annex.app/Contents/MacOS/git-remote-tor-annex @@ -0,0 +1,31 @@ +#!/bin/sh +link="$(readlink "$0")" || true +if [ -n "$link" ]; then + base="$(dirname "$link")" +else + base="$(dirname "$0")" +fi + +if [ ! -d "$base" ]; then + echo "** cannot find base directory (I seem to be $0)" >&2 + exit 1 +fi +if [ ! -e "$base/runshell" ]; then + echo "** cannot find $base/runshell" >&2 + exit 1 +fi + +# Get absolute path to base, to avoid breakage when things change directories. +orig="$(pwd)" +cd "$base" +base="$(pwd)" +cd "$orig" + +# If this is a standalone app, set a variable that git-annex can use to +# install itself. +if [ -e "$base/git-annex" ]; then + GIT_ANNEX_APP_BASE="$base" + export GIT_ANNEX_APP_BASE +fi + +exec "$base/runshell" git-remote-tor-annex "$@"